{% extends "base.html" %}
<!-- Replace the TITLE of template base.html -->
{% block title %}{{ post.title }}{% endblock %}

{% block stylesheets %}
  {{ super() }}
{% endblock stylesheets %}


<!-- Replace the BODY of template base.html -->
{% block body %}
    <h3>{{ post.title }}</h3>
    {{ post.pulish_date }}
    {{ post.text }}

    <div class="col-lg-12">
        <h3>新评论:</h3>
        <form method="POST" action="{{ url_for('blog_blueprint.post', post_id=post.id) }}">
            {{ form.hidden_tag() }}
            <div>
                <!-- Field: `name` label -->
                {{ form.name.label }}
                {% if form.name.errors %}
                    {% for e in form.name.errors %}
                        <p class="help-block">{{ e }}</p>
                    {% endfor %}
                {% else %}
                    {{ form.name(class_="form-control") }}
                {% endif %}
            </div>

            <div class="form-group">
                {{ form.text.label }}
                {% if form.text.errors %}
                    {% for e in form.text.errors %}
                        <p class="help-block">{{ e }}</p>
                    {% endfor %}
                {% else %}
                    {{ form.text(class_='form-control') }}
                {% endif %}
            </div>

            <input class="btn btn-primary" type="submit" value="提交评论">
        </form>
    </div>
{% endblock %}